<!DOCTYPE html>




<html class="theme-next pisces" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">













<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">


















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">


<link href="https://fonts.loli.net/css?family=EB+Garamond:400,400i,700,700i|Noto+Serif+SC:400,500,700&display=swap&subset=chinese-simplified" rel="stylesheet">




  

<link href="//cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="NiN,">





  <link rel="alternate" href="/atom.xml" title="孔明の博客" type="application/atom+xml">






<meta name="description" content="文章提出在每个局部感受野中进行更加复杂的运算，提出了对卷积层的改进算法：MLP卷积层。传统的卷积神经网络一般来说是由：线性卷积层、池化层、全连接层堆叠起来的网络，卷积层通过线性滤波器进行线性卷积运算，然后在接个非线性激活函数，最终生成特征图。">
<meta name="keywords" content="NiN">
<meta property="og:type" content="article">
<meta property="og:title" content="【图像分类—NIN】Network in Network">
<meta property="og:url" content="https://gkm0120.github.io/p/41470.html">
<meta property="og:site_name" content="孔明の博客">
<meta property="og:description" content="文章提出在每个局部感受野中进行更加复杂的运算，提出了对卷积层的改进算法：MLP卷积层。传统的卷积神经网络一般来说是由：线性卷积层、池化层、全连接层堆叠起来的网络，卷积层通过线性滤波器进行线性卷积运算，然后在接个非线性激活函数，最终生成特征图。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318193941.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318193956.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194007.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194013.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194018.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194024.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194029.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194035.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194041.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194050.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194057.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194102.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194107.png">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194113.png">
<meta property="og:updated_time" content="2021-04-06T12:13:06.129Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="【图像分类—NIN】Network in Network">
<meta name="twitter:description" content="文章提出在每个局部感受野中进行更加复杂的运算，提出了对卷积层的改进算法：MLP卷积层。传统的卷积神经网络一般来说是由：线性卷积层、池化层、全连接层堆叠起来的网络，卷积层通过线性滤波器进行线性卷积运算，然后在接个非线性激活函数，最终生成特征图。">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318193941.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":true},
    fancybox: true,
    tabs: true,
    motion: {"enable":false,"async":false,"transition":{"post_block":"flipYIn","post_header":"perspectiveRightIn","post_body":"perspectiveLeftIn","coll_header":"perspectiveDownIn","sidebar":"perspectiveUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://gkm0120.github.io/p/41470.html">





<!-- 设置文章需要密码访问 -->
<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！');
                history.back();
            }
        }
    })();
</script>

  <title>【图像分类—NIN】Network in Network | 孔明の博客</title>

  

  








<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css">
<link rel="stylesheet" href="/css/prism-line-numbers.css" type="text/css"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <!--fork me from github-->
    <a href="https://github.com/gkm0120" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#64CEAA; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">孔明の博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description"></h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            Archives
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>
            
            Search
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="Searching..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://gkm0120.github.io/p/41470.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="戈孔明">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="孔明の博客">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">【图像分类—NIN】Network in Network</h2>
        

        <div class="post-meta">
          <span class="post-time">

             

             

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2020-12-18T10:11:52+08:00">
                2020-12-18
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/论文翻译/" itemprop="url" rel="index">
                    <span itemprop="name">论文翻译</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          <!--
          
          -->

          
            <span class="post-wordcount">
              
                
                  <span class="post-meta-divider">|</span>
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                <span title="Words count in article">
                  6.6k
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                <span title="Reading time">
                  23 分钟
                </span>
              
            </span>
          

          <!-- 隐藏文章内标题下，内容描述
          
          -->

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>文章提出在每个局部感受野中进行更加复杂的运算，提出了对卷积层的改进算法：MLP卷积层。传统的卷积神经网络一般来说是由：线性卷积层、池化层、全连接层堆叠起来的网络，卷积层通过线性滤波器进行线性卷积运算，然后在接个非线性激活函数，最终生成特征图。</p>
<a id="more"></a>


<img width="600" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318193941.png">

<h1 id="一、论文翻译"><a href="#一、论文翻译" class="headerlink" title="一、论文翻译"></a>一、论文翻译</h1><blockquote>
<p>论文：<a href="https://arxiv.org/abs/1312.4400" target="_blank" rel="noopener">Network In Network</a></p>
</blockquote>
<h2 id="摘要"><a href="#摘要" class="headerlink" title="摘要"></a>摘要</h2><p>我们提出了一种新型的深度网络结构，称为“Network In Network”（NIN），它可以增强模型在感受野（receptive field）内对局部区域（local patches）的辨别能力。传统的卷积层使用线性滤波器来扫描输入，后面接一个非线性激活函数。而我们则构建了一些结构稍复杂的微型神经网络来抽象receptive field内的数据。 我们用多层感知器实例化微型神经网络，这是一种有效的函数逼近器。特征图可以通过微型神经网络在输入上滑动得到，类似于CNN；接下来特征图被传入下一层。深度NIN可以通过堆叠上述结构实现。通过微型网络增强局部模型，我们就可以在分类层中利用所有特征图的全局平均池化层（GAP），这样更容易解释且比传统的全连接层更不容易过拟合。我们证明了NIN在CIFAR-10和CIFAR-100上得到了有史以来最佳的表现以及在SVHN和MNIST数据集上合理的表现。</p>
<h2 id="1-介绍"><a href="#1-介绍" class="headerlink" title="1 介绍"></a>1 介绍</h2><p>卷积神经网络（CNN）由卷积层和池化层交替组成。卷积层使用线性滤波器和底层receptive field做内积，然后接一个非线性的激活函数，得到的输出称作特征图（feature map）。</p>
<p>CNN的卷积滤波器是底层数据块的广义线性模型（generalized linear model ）（GLM），而且我们认为它的抽象程度较低。这里的抽象较低是指该特征对同一概念的变体是不变的。用更有效的非线性函数逼近器代替GLM可以增强局部模型的抽象能力。当样本的隐含概念（latent concept）线性可分时，GLM可以达到很好的抽象程度，例如：这些概念的变体都在GLM分割平面的同一边，而传统的CNN就默认了这个假设——认为隐含概念（latent concept）是线性可分的。然而，同一概念的数据通常是非线性流形的（nonlinear manifold），捕捉这些概念的表达通常都是输入的高维非线性函数。在NIN中，GLM用“微型网络”结构替代，该结构是一个非线性函数逼近器。在本项研究中，我们选择多层感知器实例化微型网络，该感知器是一个通用函数逼近器，也是一个通过反向传播训练的神经网络。</p>
<p>最终结构我们称为“mlpconv”层，与CNN的比较见图1.</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318193956.png">

<p>图1 线性卷积层与mlpconv层的比较。线性卷积层包含线性滤波器，而mlpconv层包含的是微型网络（本文选择多层感知器）。两种层都将局部感受野映射到了隐含概念的置信度值 </p>
<p>线性卷积层和mlpconv层都从局部感受野（receptive field）映射到了输出特征向量。mlpconv 层将局部块的输入通过一个由全连接层和非线性激活函数组成的多层感知器（MLP）映射到了输出的特征向量。MLP在所有局部感受野中共享。特征图通过用像CNN一样的方式在输入上滑动MLP得到，NIN的总体结构是一系列mplconv层的堆叠。被称作“Network In Network”（NIN），因为内部含有MLP。</p>
<p>我们没有采用传统CNN的全连接层进行分类，而是直接通过全局平均池化层（GAP）输出最后一个mlpconv层特征图的空间平均值作为类别的置信度值，然后将得到的向量输入softmax层。在传统的CNN中，很难解释如何将来自分类层（objective cost layer）的分类信息传递回前一个卷积层，因为全连接层像一个黑盒一样。相比之下，全局平均池化层（GAP）更有意义且容易解释，因为它强化了特征图与分类的对应关系，这是通过使用微型网络构成的局部建模器实现的。此外，全连接层更容易过拟合且严重依赖于dropout正则化，而GAP则本身就是一个结构化的正则化器，能避免整体结构的过拟合。</p>
<h2 id="2-卷积神经网络"><a href="#2-卷积神经网络" class="headerlink" title="2 卷积神经网络"></a>2 卷积神经网络</h2><p>经典卷积神经网络由卷积层和空间池化层交替堆叠产生。卷积层通过线性卷积滤波器接一个非线性激活函数（如rectifier，sigmoid，tanh等等）生成特征图。例如使用rectifier激活函数，特征图的计算如下：<br>$$f_{i,j,k} = max(w^T_kx_{ij},0) \tag{1}$$<br>这里的$(i, j)$是特征图像素的索引，$x_{ij}$代表以位置$(i, j)$为中心的输入块，$k$用来索引特征图的颜色通道。</p>
<p>当隐含概念线性可分时，这种线性卷积足以用于抽象，但是要想得到更好的抽象，应该是用输入数据的高度非线性函数。在传统的CNN中，这可以通过利用一套完整的滤波器来弥补，覆盖所有隐含概念的变化。也就是说，单独的线性滤波器可以学习检测同一概念的不同变化。但是同一概念使用太多的滤波器会给下一层带来额外的负担，需要考虑来自前一层的所有变化的组合，来自更高层的滤波器会映射到原始输入的更大区域，它通过结合下层的较低级概念生成较高级的概念，因此，我们认为在每一个局部块结合生成更高级概念之前就作出更好的抽象是更有益的。</p>
<p>在最近的maxout网络中，特征图的数目通过在affine feature maps上做最大池化来减少（affine feature maps是线性卷积未通过激活函数的直接结果）。线性函数的最大化使分段线性逼近器能逼近任何凸函数。与执行线性可分的传统卷积层相比，maxout网络更有效，因为它能分离在凸集内的概念。这种改进使maxout网络在几个基准数据集上表现出色。</p>
<p>但是maxout网络加了一个前提：隐含概念位于输入空间的凸集内，而这是不一定的。因此应该使用一个更通用的函数逼近器，在隐含概念处于更复杂的分布时也依然能用。我们通过使用新的“Network In Network”结构在实现这个需求，在每个卷积层内引入一个微型网络，来计计算和抽象每个局部块的特征。</p>
<p>在输入上滑动微型网络已经在之前的研究中提出过。比如，Sturctured Multilayer Perceptron(SMLP)在输入图片的不同块中使用了共享的多层感知器；在另一项研究中，基于神经网络的滤波器被训练以用于面部检测。但是，他们都是针对某个特定问题设计的，且滑动的网络结构都只有一层。NIN则从一个通用的角度上提出，微型网络被整合到CNN结构中，以追求对各级特征的更好的抽象。</p>
<h2 id="3-网络中的网络"><a href="#3-网络中的网络" class="headerlink" title="3 网络中的网络"></a>3 网络中的网络</h2><p>我们首先强调提出的“Network In Network”结构的关键组成：3.1节和3.2节分别介绍了MLP卷积层和全局平均池化层。然后我们在3.3节详细介绍NIN整体。</p>
<h3 id="3-1-MLP卷积层"><a href="#3-1-MLP卷积层" class="headerlink" title="3.1 MLP卷积层"></a>3.1 MLP卷积层</h3><p>由于隐含概念的分布一开始并不知道，所以用一个通用函数逼近器做局部块的特征提取，因为它能逼近隐含概念的更多抽象表示。Radial basis network和多层感知器是两个众所周知的通用函数逼近器。我们使用多层感知器，有两个原因，首先，多层感知器与卷积神经网络的结构一样，都是通过反向传播训练。其次多层感知器本身就是一个深度模型，符合特征再利用的精神。这种多层感知器层在文本被称作mlpconv，我们用它来替代GLM（general linear model）在输入上做卷积。图1展示了线性卷积层和mplconv层的不同。mlpconv层的计算如下：</p>
<p>$$<br>f^1_{i,j,k_1} = max({w_{k_1}^1}^{T}x_{ij}+b_{k_1},0) \ \tag{2}\<br>\cdots\\<br>f^n_{i,j,k_n} = max({w_{k_n}^n}^{T}f_{ij}^{n-1}+b_{k_n},0)<br>$$</p>
<p>这里n是多层感知器中的层编号。rectified为多层感知器的激活函数。</p>
<p>从cross channel（cross feature map）池化的角度来看，公式2等效于级联普通卷积层的cross channel parametric pooling。每个池化层在输入特征图上做加权线性重组，然后通过rectifier函数。池化了的cross channel特征图又在下一层池化，如此一遍又一遍重复。级联的cross channel parameteric pooling结构允许复杂的和可学习的cross channel信息进行交互。</p>
<p>cross channel parametric pooling层也等效于一个1x1卷积核的卷积层。这个解释可以更直观的理解NIN的结构。</p>
<p><strong>与maxout层的比较</strong>: maxout网络中的maxout层在affine feature maps上做了最大池化，maxout层的特征图计算如下：<br>$$f_{i,j,k} = \mathop{max}\limits_{m}({w^T_{k_m}}x_{ij}) \tag{3}$$</p>
<p>maxout线性函数形成了一个分段线性函数，可以给任何凸函数建模。对于一个凸函数来说，函数值在特定阈值下的样本点形成一个凸集，因此，通过拟合局部块的凸函数，可以形成样本点在凸集内的概念的分割超平面（例如，l2 balls, convex cones）。mlpconv层和maxout层的不同之处在与见凸函数拟合器用通用函数拟合器替代，使其能对更多的隐含概念分布建模。</p>
<h3 id="3-2-全局平均池"><a href="#3-2-全局平均池" class="headerlink" title="3.2 全局平均池"></a>3.2 全局平均池</h3><p>传统卷积神经网络在网络的较低层执行卷积。对于分类任务，最后一个卷积层得到的特征图被向量化然后送入全连接层，接一个softmax逻辑回归层。这种结构将卷积结构与传统神经网络分类器连接起来，见卷积层作为特征提取器，得到的特征用传统方式进行分类。</p>
<p>但是，全连接层容易过拟合，从而阻碍了整个网络的泛化能力。后来dropout被Hinton等人提出，用于正则化，在训练过程中随机地将全连接层的一半激活值置零，改善了它的泛化能力并且很大程度地预防了过拟合。</p>
<p>在本文中，我们提出了另一个策略，叫做全局平均池化层，用它来替代CNN中的全连接层。想法是在最后一个mlpconv层生成一个分类任务中相应类别的特征图。我们没有在特征图最顶端增加全连接层，而是求每个特征图的平均值，得到的结果向量直接输入softmax层。GAP相比全连接层的优点在于通过增强特征图与类比间的对应关系使卷积结构保留的更好，使特征图分类是可信的得到很好的解释；另一个优点是GAP层中没有参数设置，因此避免了过拟合；此外，GAP汇聚了空间信息，所以对输入的空间转换更鲁棒。</p>
<p>我们可以看到GAP作为一个正则化器，加强了特征图与概念（类别）的可信度的联系。这是通过mlpconv层实现的，因为他们比GLM更好逼近置信图（conficence maps）。</p>
<h3 id="3-3-网络中的网络结构"><a href="#3-3-网络中的网络结构" class="headerlink" title="3.3 网络中的网络结构"></a>3.3 网络中的网络结构</h3><p>NIN的整体结构是一系列mlpconve层的堆叠，最上层接一个GAP层和分类层。mlpconv层间的子层可以被相加，像CNN和maxout网络一样。图2展示了一个包含三个mlpconv层的NIN。每个mlpconv层，包含一个三层的感知器，NIN和微型网络的层数都是灵活的，可以根据具体任务微调。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194007.png">

<p>图2 NIN的整体结构。本文的NIN由三个mlpconve层和一个GAP层堆叠而成。</p>
<h2 id="4-实验"><a href="#4-实验" class="headerlink" title="4 实验"></a>4 实验</h2><h3 id="4-1-概况"><a href="#4-1-概况" class="headerlink" title="4.1 概况"></a>4.1 概况</h3><p>我们在四个基准数据集上评估了NIN：CIFAR-10，CIFAR-100，SVHN和MNIST。网络在这些数据上都使用三层堆叠mplconv层结构，mlpconv层后面都跟随一个最大池化层，把原输入样本缩减一倍。作为正则化器，除了最后一个mlpconv层外所有输出都加一个dropout。除非特别说明，否则实验部分的所有全连接层都用全局平均池化层替代。另一个正则化方法是和Krizhevsky等人一样的权重衰减。图2展示了本节所用的NIN网络整体结构，详细的参数设置在补充材料中。我们使用由AlexKrizhevsky开发的超快速cuda-convnet代码来实现我们的网络。数据预处理和训练集验证集的拆分同Goodfellow。</p>
<p>我们的训练过程同Krizhevsky等人一样。也就是说，我们手动初始化了权重以及学习率，使用128小批次训练。训练层初始化权重和学习率开始，直到训练集上的准确率停止改善，然后损失率减少10倍，再继续训练，重复直到学习率衰减到1%。</p>
<h3 id="4-2-CIFAR-10"><a href="#4-2-CIFAR-10" class="headerlink" title="4.2 CIFAR-10"></a>4.2 CIFAR-10</h3><p>CIFAR-10数据集由10类自然图片组成，有50000张训练图片，10000张测试图片，每张图片是32x32的RGB图片。对于这个数据集，我们使用与Goodfellow在maxout network中相同的global contrast normalization和ZCA白化。我们用训练集的最后10000张图片做验证集。</p>
<p>实验中每个mlpconv层的特征图数与maxout网络相同。有两个超参数用验证集微调，如局部感受野（local receptive field）的大小和权重衰减。超参数调整好后固定，然后重新在训练集合验证集上训练，将最终模型用于测试集。我们在测试集上得到了10.41%的错误率，比当前最优结果降低1%。</p>
<p>表1展示了与先前方法的对比。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194013.png">

<p>我们实验证明，mlpconv层间使用dropout可以通过增加模型泛化能力来提升模型表现。如图3所示，在mlpconv层间引用dropout层错误率减少了20%多。这一结果与Goodfellow等人的一致，所以本文的所有模型mlpconv层间都加了dropout。没有dropout的模型在CIFAR-10数据集上错误率是14.5%，已经超过之前最好的使用正则化的模型（除了maxout）。由于没有dropout的maxout不可靠，所以本文只与有dropout正则器的版本比较。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194018.png">

<p>与先前一样，我们也在做了位移和水平翻转的数据增强的CIFAR-10数据集上对我们的方法做了评估，在测试集上达到了8.81%的错误率，创了新纪录。</p>
<h3 id="4-3-CIFAR-100"><a href="#4-3-CIFAR-100" class="headerlink" title="4.3 CIFAR-100"></a>4.3 CIFAR-100</h3><p>CIFAR-100和CIFAR-10数据规模一样，只是分为100类。因此每一类图的数目是CIFAR-10的1/10。对于CIFAR-100，我们不调整超参数，而是使用和CIFAR-10一样的设置。位移的不同是最后一个mlpconv层输出100个特征图。CIFAR-100在测试集上的错误率为35.68%，超了当前不做数据增强最好的表现1%多。详细的表现比较见表2。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194024.png">


<h3 id="4-4-Street-View-House-Numbers"><a href="#4-4-Street-View-House-Numbers" class="headerlink" title="4.4 Street View House Numbers"></a>4.4 Street View House Numbers</h3><p>SVHN数据集由630,420 32x32的彩图组成，分为训练集、测试集和额外集。这个数据集的任务是识别出每张图中间的数字。训练和测试过程同Goodfellow，也就是说，每一类从训练集中选择400张图，从额外集中选200张图作为验证集。剩余的训练集和额外集用于训练。验证集只用于调整超参数，不用于训练。</p>
<p>数据集的预处理也同Goodfellow，即local contrast normalization。用于SVHN的结构和参数设置同CIFAR-10一样，由三个mlpconv层加GAP组成。我们在这个数据集上得到2.35%的错误率。我们将结果与其他没有做数据增强的方法结果进行比较，如表3所示。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194029.png">


<h3 id="4-5-MNIST"><a href="#4-5-MNIST" class="headerlink" title="4.5 MNIST"></a>4.5 MNIST</h3><p>MNIST数据集由28x28的0-9手写数字组成。有60000张训练集图片和10000张测试集图片。对于这个数据集，网络结构同CIFAR-10一样，只是每个mlpconv层的特征图数减少了，因为MNIST比CIFAR-10简单。与先前使用卷积神经网络的结果对比如表4.</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194035.png">

<p>我们得到了0.47%的表现，但是没有当前最好的0.45%好，因为MNIST的错误率已经非常低了。</p>
<h3 id="4-6-作为正则化器的全局平均池"><a href="#4-6-作为正则化器的全局平均池" class="headerlink" title="4.6 作为正则化器的全局平均池"></a>4.6 作为正则化器的全局平均池</h3><p>GAP层和全连接层很相似，都对特征向量做了线性转换。不同的是转换矩阵。GAP的转换矩阵是事先定义的并且仅在共享相同值的块对角线元素上是非零的。全连接层可以有复杂矩阵变换且值是通过反向传播设置的。为了研究GAP的正则化影响，我们用GAP替换全连接层，模型其他部分相同。我们评估了全连接层前面有dropout和没有dropout的模型，都在CIFAR-10上测试，表现比较如表5.</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194041.png">

<p>如表5所示，全连接层没有dropout的表现最差，11.59%，与预期一样，全连接层没有正则化器会过拟合。全连接层前增加了dropout后测试集错误率为10.88%。GAP在三者比较中得到了最低错误率10.41%。</p>
<p>然后我们探索了GAP对传统CNN来说是否也有同样的正则化影响。我们实例化了一个像Hiton等人描述的传统CNN，由三个卷积层和一个局部连接层（local connection layer）组成。局部连接层生成16个特征图，传给没有dropout的全连接层。为了比较的公正性，我们把局部连接层的特征图数从16减到了10，因为GAP的每个类别只允许一个特征图。GAP的等价网络由dropout+带有GAP的全连接层替代，表现在CIFAR-10上测试。</p>
<p>全连接层的CNN模型只能得到17.56%的错误率，添加dropout后与Hinton等人提到的表现相近——15.99%。用GAP替换全连接层，我们达到16.46%的错误率，与没有dropout的CNN相比提升了1%。这又一次验证了GAP层作为正则化器的有效性。尽管比dropout稍差一些，但是我们认为GAP可能对线性卷积要求过高，因为它需要带有rectified激活函数的线性滤波器来为类别的置信图建模。</p>
<h3 id="4-7-NIN的可视化"><a href="#4-7-NIN的可视化" class="headerlink" title="4.7 NIN的可视化"></a>4.7 NIN的可视化</h3><p>我们通过GAP来增强NIN最后一个mlpconv层的特征图，使其作为分类是可信的，这可能会加强局部感受野的建模。为了知道这个目标实现了多少，我们提取和可视化了在CIFAR-10上训练的模型的来自最后一个mlpconv层的特征图。</p>
<p>图4展示了CIFAR-10上测试集上选择的10类的一些示例图和相关特征图。如预期，特征图的最大激活区域和输入的相关真实分类吻合，这明显是GAP加强过的。在真实分类的特征图内，可以看到最大的激活区域出现在与原物体相同的区域，在结构化物体中尤其如此，例如图4第二行的车。注意这些特征图的分类只用类别信息进行训练，如果使用有边界框标注的图片效果会更好。</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194050.png">

<p>可视化证明了NIN的有效性，通过用mlpconv层建模得到一个更强的局部感受野，使其有效，然后GAP增强了特征图类别的学习。下一步研究可以用于物体侦测，侦测结果可以基于与Farabet等人的场景标记工作相同的类别级特征图来实现。</p>
<h2 id="5-结论"><a href="#5-结论" class="headerlink" title="5 结论"></a>5 结论</h2><p>我们提出了一个新的深度网络，叫做“Network In Network”（NIN），用于分类任务。这个新结构有mlpconv层组成，使用多层感知器对输入进行卷积，用GAP代替传统CNN中的全连接层。mlpconv层对局部块建模更好，GAP充当结构化正则化器，防止了过拟合。用NIN的这两个组件，我们得到了当前在CIFAR-10，CIFAR-100和SVHN数据集上最好的表现。通过可视化特征图，我们证明了来自NIN的最后一个mlpconv层的特征图得到的分类是可信的，并且使通过NIN做物体侦测变成了可能。</p>
<hr>
<h1 id="二、论文解读"><a href="#二、论文解读" class="headerlink" title="二、论文解读"></a>二、论文解读</h1><h2 id="1-Network-In-Network"><a href="#1-Network-In-Network" class="headerlink" title="1 Network In Network"></a>1 Network In Network</h2><p>CNN高层特征其实是低层特征通过某种运算的组合, 至于这个运算的目的就是提取高维特征, 线性卷积层采用的是离散卷积运算, 那么能不能改进这个运算使得特征提取更加高效呢, 基于这种思想, 文章提出在每个局部感受野中进行更加复杂的运算，提出了对卷积层的改进算法：<strong>MLP卷积层</strong></p>
<p>传统的卷积神经网络一般来说是由：线性卷积层、池化层、全连接层堆叠起来的网络，卷积层通过线性滤波器进行线性卷积运算，然后在接个非线性激活函数，最终生成特征图。一般来说线性卷积层用来提取线性可分的特征，但所提取的特征高度非线性时，需要更加多的filters来提取各种潜在的特征，这样就导致filters太多，使得网络参数太多，网络过于复杂对于计算压力太大且容易过拟合。这就产生了传统卷积网络的两个痛点:</p>
<ul>
<li>线性卷积层在处理高度非线性的底层特征时, 使得网络参数过多</li>
<li>传统的CNN最后一层都是全连接层，参数个数非常之多，容易引起过拟合</li>
</ul>
<h2 id="2-MLP卷积层"><a href="#2-MLP卷积层" class="headerlink" title="2 MLP卷积层"></a>2 MLP卷积层</h2><p>如下图所示:</p>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194057.png">

<p>(a): 左图是一个<strong>线性卷积层</strong>, 该层在局部感受野上的运算可以理解为一个单层的网络<br>(b): 右图是一个<strong>MLP卷积层</strong>, 该层可以看成是每个卷积的局部感受野中还包含了一个微型的多层网络, 使得计算比传统CNN更加复杂, 从而提高对非线性特征的提取能力</p>
<p>MLP卷积层可以理解为在一个传统的CNN卷积层的基础上把网络在局部感受野的尺度上做深, 增加单个NIN的特征表示能力</p>
<h2 id="3-全局均值池化"><a href="#3-全局均值池化" class="headerlink" title="3 全局均值池化"></a>3 全局均值池化</h2><p>传统的卷积神经网络卷积运算一般是出现在低层网络。对于分类问题，最后一个卷积层的特征图通过量化然后与全连接层连接，最后在接一个softmax逻辑回归分类层。这种网络结构，使得卷积层和传统的神经网络层连接在一起。我们可以把卷积层看做是特征提取器，然后得到的特征再用传统的神经网络进行分类。传统CNN网络中最后全连接层参数过多很容易导致过拟合，造成网络的泛化能力差，Alexnet中使用dropout来防止过拟合提高网络的泛化能力。</p>
<p><strong>文章提出采用全局均值池化的方法，替代传统CNN中的全连接层</strong>。与传统的全连接层不同，对每个特征图(feature map)的整张图片进行全局均值池化，这样每张特征图都可以得到一个输出。<strong>采用均值池化，可以大大减小网络的参数数量，避免模型过拟合，另一方面它有一个特点，每张特征图相当于一个输出特征，然后这个特征就表示了输出类的特征</strong>。这样如果我们在做1000个分类任务的时候，我们网络在设计的时候，最后一层的特征图个数就要选择1000</p>
<p><strong>网络结构</strong><br><img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194102.png"></p>
<p>在全局结构图中我们可看到:</p>
<ul>
<li>在局部网络中, 在局部感受野进行卷积运算的基础上又加了两层小的全连接层</li>
</ul>
<ol>
<li>NIN的实现方式</li>
</ol>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194107.png">


<ul>
<li><p>由Caffe的prototxt文件可知, 在实现NIN的时候, 全连接层的实现方式为:设置一个滤波器大小为1,步长为1的卷积层实现全连接层</p>
</li>
<li><p>由输出尺寸公式得, 内部小网络的增加并不改变输出数据体的大小:<br>$$\frac{W−F+2P}{S}+1=\frac{W−1+0}{1}+1=W$$</p>
</li>
</ul>
<ol start="2">
<li>全局均值池化</li>
</ol>
<img width="300" height="300" src="https://cdn.jsdelivr.net/gh/gkm0120/CDN/img/20210318194113.png">

<ul>
<li>在Alexnet网络中最后一个卷积层输出的特征图大小是6∗6, pooling的<strong>大小选择6，方法选择：AVE进行全局均值池化</strong></li>
</ul>
<p>综上, 在AlexNet的基础上, 只需要简简单单的把卷积核的大小变一下，然后最后一层的全连接层直接用avg pooling替换一下就可以实现了</p>
<p>参考：</p>
<ol>
<li><a href="https://arxiv.org/abs/1312.4400" target="_blank" rel="noopener">《Network In Network》</a></li>
<li><a href="http://dgschwend.github.io/netscope/#/preset/nin" target="_blank" rel="noopener">nin imagenet</a></li>
<li><a href="http://simtalk.cn/2016/10/05/Network-In-Network/" target="_blank" rel="noopener">Network In Network</a></li>
<li><a href="https://github.com/BVLC/caffe/wiki/Model-Zoo#network-in-network-model" target="_blank" rel="noopener">Network in Network model</a></li>
</ol>
<script>
        document.querySelectorAll('.github-emoji')
          .forEach(el => {
            if (!el.dataset.src) { return; }
            const img = document.createElement('img');
            img.style = 'display:none !important;';
            img.src = el.dataset.src;
            img.addEventListener('error', () => {
              img.remove();
              el.style.color = 'inherit';
              el.style.backgroundImage = 'none';
              el.style.background = 'none';
            });
            img.addEventListener('load', () => {
              img.remove();
            });
            document.body.appendChild(img);
          });
      </script>

        

      
    </div>

      <!-- 相关文章推荐 -->
     

    
    
    

    <div>
          
            

          
    </div>

    

    <div>
      
        <div>
    
        <div class="read-over">-------------------本文结束 <i class="fa fa-paw"></i> 感谢您的阅读-------------------</div>
    
</div>

      
    </div>

    
      <div>
        <div class="share_reward">
  <div></div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>Donate</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="戈孔明 WeChat Pay">
        <p>WeChat Pay</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="戈孔明 Alipay">
        <p>Alipay</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/NiN/" rel="tag"> <i class="fa fa-tag"></i> NiN</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/p/19719.html" rel="next" title="【图像分类—GoogLeNet Inception V1】Going Deeper With Convolutions">
                <i class="fa fa-chevron-left"></i> 【图像分类—GoogLeNet Inception V1】Going Deeper With Convolutions
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/p/25484.html" rel="prev" title="【图像分类—GoogLeNet Inception V2】Batch Normalization">
                【图像分类—GoogLeNet Inception V2】Batch Normalization <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
         <div data-weibo-title="分享到微博" data-qq-title="分享到QQ" data-douban-title="分享到豆瓣" class="social-share" data-disabled="qzone,google+,linkedin" data-description="Share.js - 一键分享到微博，QQ空间，腾讯微博，人人，豆瓣...">
   分享到：
</div>


      
    </div>
  </div>


          </div>
          


          

  
    <div id="gitalk-container"></div>

  





        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <a href="/">
              <img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="戈孔明">
              </a>
            
              <p class="site-author-name" itemprop="name">戈孔明</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">categories</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">tags</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
              <!-- 为Hexo Next主题添加哈林摇特效  -->
              <a title="收藏到书签，偶尔High一下^_^" rel="alternate" class="mw-harlem_shake_slow wobble shake" href="javascript:void(0)" onclick="javascript:(    /*     * Copyright (C) 2015 Rocko (rocko.xyz) <rocko.zxp@gmail.com>     *     * Licensed under the Apache License, Version 2.0 (the 'License');     * you may not use this file except in compliance with the License.     * You may obtain a copy of the License at     *     *      http://www.apache.org/licenses/LICENSE-2.0     *     * Unless required by applicable law or agreed to in writing, software     * distributed under the License is distributed on an 'AS IS' BASIS,     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.     * See the License for the specific language governing permissions and     * limitations under the License.     */    function go() {        function c() {        var e = document.createElement('link');        e.setAttribute('type', 'text/css');        e.setAttribute('rel', 'stylesheet');        e.setAttribute('href', f);        e.setAttribute('class', l);        document.body.appendChild(e)    }     function h() {        var e = document.getElementsByClassName(l);        for (var t = 0; t < e.length; t++) {            document.body.removeChild(e[t])        }    }     function p() {        var e = document.createElement('div');        e.setAttribute('class', a);        document.body.appendChild(e);        setTimeout(function() {            document.body.removeChild(e)        }, 100)    }     function d(e) {        return {            height : e.offsetHeight,            width : e.offsetWidth        }    }     function v(i) {        var s = d(i);        return s.height > e &amp;&amp; s.height < n &amp;&amp; s.width > t &amp;&amp; s.width < r    }     function m(e) {        var t = e;        var n = 0;        while (!!t) {            n += t.offsetTop;            t = t.offsetParent        }        return n    }     function g() {        var e = document.documentElement;        if (!!window.innerWidth) {            return window.innerHeight        } else if (e &amp;&amp; !isNaN(e.clientHeight)) {            return e.clientHeight        }        return 0    }     function y() {        if (window.pageYOffset) {            return window.pageYOffset        }        return Math.max(document.documentElement.scrollTop, document.body.scrollTop)    }     function E(e) {        var t = m(e);        return t >= w &amp;&amp; t <= b + w    }     var songs = [                'http://s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3', 'http://www.ytmp3.cn/down/57563.mp3'  ];    function S() {        var e = document.getElementById('audio_element_id');        if(e != null){            var index = parseInt(e.getAttribute('curSongIndex'));            if(index > songs.length - 2) {                index = 0;            } else {                index++;            }            e.setAttribute('curSongIndex', index);            N();        }        e.src = i;        e.play()    }     function x(e) {        e.className += ' ' + s + ' ' + o    }     function T(e) {        e.className += ' ' + s + ' ' + u[Math.floor(Math.random() * u.length)]    }     function N() {        var e = document.getElementsByClassName(s);        var t = new RegExp('\\b' + s + '\\b');        for (var n = 0; n < e.length; ) {            e[n].className = e[n].className.replace(t, '')        }    }    function initAudioEle() {        var e = document.getElementById('audio_element_id');        if(e === null){            e = document.createElement('audio');            e.setAttribute('class', l);            e.setAttribute('curSongIndex', 0);            e.id = 'audio_element_id';            e.loop = false;            e.bgcolor = 0;            e.addEventListener('canplay', function() {            setTimeout(function() {                x(k)            }, 500);            setTimeout(function() {                N();                p();                for (var e = 0; e < O.length; e++) {                    T(O[e])                }            }, 15500)        }, true);        e.addEventListener('ended', function() {            N();            h();            go();        }, true);        e.innerHTML = ' <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>';        document.body.appendChild(e);        }    }        initAudioEle();    var e = 30;    var t = 30;    var n = 350;    var r = 350;    var curSongIndex = parseInt(document.getElementById('audio_element_id').getAttribute('curSongIndex'));    var i = songs[curSongIndex];        var s = 'mw-harlem_shake_me';    var o = 'im_first';    var u = ['im_drunk', 'im_baked', 'im_trippin', 'im_blown'];    var a = 'mw-strobe_light';    var f = 'https://rocko.xyz/css/harlem-shake-style.css';        var l = 'mw_added_css';    var b = g();    var w = y();    var C = document.getElementsByTagName('*');    var k = null;    for (var L = 0; L < C.length; L++) {        var A = C[L];        if (v(A)) {            if (E(A)) {                k = A;                break            }        }    }    if (A === null) {        console.warn('Could not find a node of the right size. Please try a different page.');        return    }    c();    S();    var O = [];    for (var L = 0; L < C.length; L++) {        var A = C[L];        if (v(A)) {            O.push(A)        }    }    })()">
        <i class="fa fa-music"></i> High~
</a>

            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="https://github.com/gkm0120" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a rel="external nofollow" href="mailto:gkm0120@163.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

            <!--
            <div id="music163player">
                <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1336790004&auto=1&height=66"></iframe>
            </div>
            -->

          
          
            <div class="cc-license motion-element" itemprop="license">
              <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow" class="cc-opacity" target="_blank">
                <img src="/images/cc-by-nc-sa.svg" alt="Creative Commons">
              </a>
            </div>
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                Links&nbsp;
                <i class="fa  fa-fw fa-link"></i>
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://gkm0120.cn/" title="孔明の博客" rel="external nofollow" target="_blank">孔明の博客</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://hpcsiplab.hunnu.edu.cn/" title="LCSM" rel="external nofollow" target="_blank">LCSM</a>
                  </li>
                
              </ul>
            </div>
          

          <!--近期文章版块 began-->
          
          <!--近期文章版块 end-->

          
          
              <!-- 网站运行时间 -->
              <div id="days"></div>

<script language="javascript">
function show_date_time(){
window.setTimeout("show_date_time()", 1000);
BirthDay=new Date("03/15/2020 00:00:00");
today=new Date();
timeold=(today.getTime()-BirthDay.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=setzero(Math.floor(e_hrsold));
e_minsold=(e_hrsold-hrsold)*60;
minsold=setzero(Math.floor((e_hrsold-hrsold)*60));
seconds=setzero(Math.floor((e_minsold-minsold)*60));
document.getElementById('days').innerHTML="已运行"+daysold+"天"+hrsold+"时"+minsold+"分"+seconds+"秒";
}
function setzero(i){
if (i<10)
{i="0" + i};
return i;
}
show_date_time();
</script>

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#一、论文翻译"><span class="nav-text">一、论文翻译</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#摘要"><span class="nav-text">摘要</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#1-介绍"><span class="nav-text">1 介绍</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-卷积神经网络"><span class="nav-text">2 卷积神经网络</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-网络中的网络"><span class="nav-text">3 网络中的网络</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-MLP卷积层"><span class="nav-text">3.1 MLP卷积层</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-全局平均池"><span class="nav-text">3.2 全局平均池</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-网络中的网络结构"><span class="nav-text">3.3 网络中的网络结构</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-实验"><span class="nav-text">4 实验</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#4-1-概况"><span class="nav-text">4.1 概况</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-2-CIFAR-10"><span class="nav-text">4.2 CIFAR-10</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-3-CIFAR-100"><span class="nav-text">4.3 CIFAR-100</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-4-Street-View-House-Numbers"><span class="nav-text">4.4 Street View House Numbers</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-5-MNIST"><span class="nav-text">4.5 MNIST</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-6-作为正则化器的全局平均池"><span class="nav-text">4.6 作为正则化器的全局平均池</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-7-NIN的可视化"><span class="nav-text">4.7 NIN的可视化</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-结论"><span class="nav-text">5 结论</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#二、论文解读"><span class="nav-text">二、论文解读</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Network-In-Network"><span class="nav-text">1 Network In Network</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-MLP卷积层"><span class="nav-text">2 MLP卷积层</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-全局均值池化"><span class="nav-text">3 全局均值池化</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

      

      <!-- 标签云 -->
      <!--
      
      <script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
      <script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
      <div class="widget-wrap">
      <h3 class="widget-title">Tag Cloud</h3>
      <div id="myCanvasContainer" class="widget tagcloud">
          <canvas width="250" height="250" id="resCanvas" style="width=100%">
              <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/AlexNet/">AlexNet</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Cauchy-问题/">Cauchy 问题</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Cohen-Sutherland/">Cohen-Sutherland</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/DES/">DES</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/FCN/">FCN</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/GoogLeNetV2/">GoogLeNetV2</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/GoogLeNetV3/">GoogLeNetV3</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/GoogleNetV1/">GoogleNetV1</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/">Hexo</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hill/">Hill</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Liang-Barsky/">Liang-Barsky</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Markdown/">Markdown</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/NiN/">NiN</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Nodejs/">Nodejs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenGL/">OpenGL</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ResNetV1/">ResNetV1</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/VGG/">VGG</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git配置/">git配置</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/latex/">latex</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/matlab函数/">matlab函数</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/matlab绘图/">matlab绘图</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/texlive安装/">texlive安装</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据集/">数据集</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/热传导方程/">热传导方程</a><span class="tag-list-count">1</span></li></ul>
          </canvas>
      </div>
      </div>
      
      -->
      <!-- 标签云 -->

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; 2020 &mdash; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
       <i class="fa fa-heartbeat"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">戈孔明</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
    <span title="Site words total count">121.3k</span>
  
</div>

<!--









-->


        
<div class="busuanzi-count">
  <!--
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  -->
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>访问人数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/npm/jquery@2.1.3/dist/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/fastclick/1.0.6/fastclick.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazyload/1.9.3/jquery.lazyload.min.js"></script>
  

  
  
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/velocity-animate@1.2.1/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/npm/velocity-animate@1.2.1/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  













  <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
  <script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
  <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
  <script type="text/javascript">
        var gitalk = new Gitalk({
          clientID: '6a4708bb548d9ee47cfd',
          clientSecret: '29a20b874fd47e6c4d1229c036d5e37beeda813d',
          repo: 'gkm0120.github.io',
          owner: 'gkm0120',
          admin: ['gkm0120'],
          id: md5(window.location.pathname),
          distractionFreeMode: 'true'
        })
        gitalk.render('gitalk-container')
       </script>



  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
    
  </script>

  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  


  <!-- Tidio 在线联系功能、鼠标点击特效、页面反馈...-->
  


  










  <script src="/js/src/activate-power-mode.min.js"></script>
  <script>
    POWERMODE.colorful = true;
    POWERMODE.shake = false;
    document.body.addEventListener('input', POWERMODE);
  </script>



  <!-- 看板娘 -->
  <!--  -->

  <!-- 看板娘 -->
  <script async src="/live2d-widget/autoload.js"></script>

  
      <!-- aplayer音频播放 -->
      <link rel="stylesheet" href="/dist/APlayer.min.css">
      <div id="aplayer"></div>
      <script type="text/javascript" src="/dist/APlayer.min.js"></script>
      <script type="text/javascript" src="/dist/music.js"></script>
  

  <!-- 代码块复制功能 -->
  <script type="text/javascript" src="/js/src/clipboard.min.js"></script>
  <script type="text/javascript" src="/js/src/clipboard-use.js"></script>

  <!--share.js-->
  <link rel="stylesheet" href="/sharejs/css/share.min.css">
  <script src="/sharejs/js/social-share.min.js"></script>

  <!-- 模仿知乎卡片样式链接、崩溃欺骗特效 -->
  <!--<script type="text/javascript" src="/js/src/linkcard.js"></script>-->

  <!--崩溃欺骗 放在js文件最后-->
  <!--<script type="text/javascript" src="/js/src/crash_cheat.js"></script>-->



</body>
</html>
